<template>
	<view class="_main_class_area">
		<block v-for="(img,index) in images" :key="`_img_${index}`">
			<image class="img" :src="img" mode="widthFix" @click="previewImage(index)"></image>
		</block>
	</view>
</template>

<script setup>
	import {
		defineProps
	} from 'vue'
	const props = defineProps({
		images: Array, // 图片数组
	})

	/**
	 * @param {Object} index
	 * 预览图片
	 */
	const previewImage = (index) => {
		uni.previewImage({
			current: index,
			urls: props.images
		});
	}
</script>

<style lang="scss" scoped>
	._main_class_area {
		.img {
			width: 100%;
			height: auto;
		}
	}
</style>